home *** CD-ROM | disk | FTP | other *** search
/ Delphi 2.0 - Programmer's Utilities Power Pack / Delphi 2.0 Programmer's Utilities Power Pack.iso / e_to_l / itgraph / vb30 / itgdemo / itgdemo1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-09-15  |  53.3 KB  |  1,540 lines

  1. VERSION 2.00
  2. Begin Form frmPlayground 
  3.    BackColor       =   &H00FFFFFF&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "ITGraph Property Playground"
  6.    ClientHeight    =   6168
  7.    ClientLeft      =   156
  8.    ClientTop       =   504
  9.    ClientWidth     =   9420
  10.    Height          =   6540
  11.    Icon            =   ITGDEMO1.FRX:0000
  12.    Left            =   108
  13.    LinkTopic       =   "frmPlayground"
  14.    ScaleHeight     =   6168
  15.    ScaleWidth      =   9420
  16.    Top             =   180
  17.    Width           =   9516
  18.    Begin PictureBox txtTransferTarget 
  19.       Height          =   1752
  20.       Left            =   6960
  21.       ScaleHeight     =   1728
  22.       ScaleWidth      =   1788
  23.       TabIndex        =   72
  24.       Tag             =   "Click here to return to main screen."
  25.       Top             =   2880
  26.       Visible         =   0   'False
  27.       Width           =   1812
  28.    End
  29.    Begin ListBox lstConnectionInfo 
  30.       BackColor       =   &H00FFFF00&
  31.       FontBold        =   0   'False
  32.       FontItalic      =   0   'False
  33.       FontName        =   "Times New Roman"
  34.       FontSize        =   9
  35.       FontStrikethru  =   0   'False
  36.       FontUnderline   =   0   'False
  37.       Height          =   1248
  38.       Left            =   6240
  39.       Sorted          =   -1  'True
  40.       TabIndex        =   85
  41.       Tag             =   "Select a node and scroll graph to that node."
  42.       Top             =   3960
  43.       Visible         =   0   'False
  44.       Width           =   2772
  45.    End
  46.    Begin CheckBox chkRedraw 
  47.       Caption         =   "Redraw"
  48.       Height          =   192
  49.       Left            =   4020
  50.       TabIndex        =   80
  51.       Top             =   3720
  52.       Value           =   1  'Checked
  53.       Width           =   972
  54.    End
  55.    Begin ListBox lstSelectNode 
  56.       BackColor       =   &H00FFFF00&
  57.       FontBold        =   0   'False
  58.       FontItalic      =   0   'False
  59.       FontName        =   "Times New Roman"
  60.       FontSize        =   9
  61.       FontStrikethru  =   0   'False
  62.       FontUnderline   =   0   'False
  63.       Height          =   1248
  64.       Left            =   6240
  65.       Sorted          =   -1  'True
  66.       TabIndex        =   64
  67.       Tag             =   "Select a node and scroll graph to that node."
  68.       Top             =   3600
  69.       Visible         =   0   'False
  70.       Width           =   2772
  71.    End
  72.    Begin PictureBox pctSpecialMenu 
  73.       BackColor       =   &H0080FFFF&
  74.       Height          =   3972
  75.       Left            =   6096
  76.       ScaleHeight     =   3948
  77.       ScaleWidth      =   2988
  78.       TabIndex        =   56
  79.       Top             =   1920
  80.       Visible         =   0   'False
  81.       Width           =   3012
  82.       Begin CommandButton cmdPrintReport 
  83.          Caption         =   "&R"
  84.          Height          =   312
  85.          Left            =   120
  86.          TabIndex        =   86
  87.          Top             =   1020
  88.          Width           =   372
  89.       End
  90.       Begin CommandButton cmdConnectionInfo 
  91.          Caption         =   "&I"
  92.          Height          =   312
  93.          Left            =   120
  94.          TabIndex        =   83
  95.          Top             =   2100
  96.          Width           =   372
  97.       End
  98.       Begin CommandButton cmdFitToWindow 
  99.          Caption         =   "&F"
  100.          Height          =   312
  101.          Left            =   120
  102.          TabIndex        =   78
  103.          Top             =   300
  104.          Width           =   372
  105.       End
  106.       Begin CommandButton cmdCancel 
  107.          Height          =   312
  108.          Left            =   120
  109.          TabIndex        =   75
  110.          Top             =   3540
  111.          Width           =   372
  112.       End
  113.       Begin CommandButton cmdCommand 
  114.          Caption         =   "&T"
  115.          Height          =   312
  116.          Left            =   120
  117.          TabIndex        =   70
  118.          Top             =   3180
  119.          Width           =   372
  120.       End
  121.       Begin CommandButton cmdSaveAs 
  122.          Caption         =   "&V"
  123.          Height          =   312
  124.          Left            =   120
  125.          TabIndex        =   67
  126.          Top             =   2820
  127.          Width           =   372
  128.       End
  129.       Begin CommandButton cmdClear 
  130.          Caption         =   "&C"
  131.          Height          =   312
  132.          Left            =   120
  133.          TabIndex        =   65
  134.          Top             =   2460
  135.          Width           =   372
  136.       End
  137.       Begin CommandButton cmdGenRandom 
  138.          Caption         =   "&G"
  139.          Height          =   312
  140.          Left            =   120
  141.          TabIndex        =   59
  142.          Top             =   1380
  143.          Width           =   372
  144.       End
  145.       Begin CommandButton cmdSelectNode 
  146.          Caption         =   "&S"
  147.          Height          =   312
  148.          Left            =   120
  149.          TabIndex        =   58
  150.          Top             =   1740
  151.          Width           =   372
  152.       End
  153.       Begin CommandButton cmdPrintGraph 
  154.          Caption         =   "&P"
  155.          Height          =   312
  156.          Left            =   120
  157.          TabIndex        =   57
  158.          Top             =   660
  159.          Width           =   372
  160.       End
  161.       Begin Label Label7 
  162.          BackColor       =   &H0080FFFF&
  163.          Caption         =   "Print a Report"
  164.          Height          =   252
  165.          Left            =   540
  166.          TabIndex        =   87
  167.          Top             =   1080
  168.          Width           =   1572
  169.       End
  170.       Begin Label Label6 
  171.          BackColor       =   &H0080FFFF&
  172.          Caption         =   "Info on a Graph Connection"
  173.          Height          =   252
  174.          Left            =   540
  175.          TabIndex        =   84
  176.          Top             =   2160
  177.          Width           =   2472
  178.       End
  179.       Begin Label Label4 
  180.          BackColor       =   &H0080FFFF&
  181.          Caption         =   "Fit Graph to Window."
  182.          Height          =   252
  183.          Left            =   540
  184.          TabIndex        =   77
  185.          Top             =   360
  186.          Width           =   1872
  187.       End
  188.       Begin Label Label21 
  189.          BackColor       =   &H0080FFFF&
  190.          Caption         =   "Cancel"
  191.          Height          =   252
  192.          Left            =   540
  193.          TabIndex        =   76
  194.          Top             =   3600
  195.          Width           =   792
  196.       End
  197.       Begin Label Label19 
  198.          BackColor       =   &H0080FFFF&
  199.          Caption         =   "Transfer Graph to a Control"
  200.          Height          =   252
  201.          Left            =   540
  202.          TabIndex        =   71
  203.          Top             =   3240
  204.          Width           =   2412
  205.       End
  206.       Begin Label Label18 
  207.          BackColor       =   &H0080FFFF&
  208.          BorderStyle     =   1  'Fixed Single
  209.          Caption         =   "SPECIAL ITGRAPH FUNCTIONS"
  210.          FontBold        =   -1  'True
  211.          FontItalic      =   0   'False
  212.          FontName        =   "Arial"
  213.          FontSize        =   9
  214.          FontStrikethru  =   0   'False
  215.          FontUnderline   =   0   'False
  216.          Height          =   252
  217.          Left            =   0
  218.          TabIndex        =   69
  219.          Top             =   0
  220.          Width           =   3012
  221.       End
  222.       Begin Label Label17 
  223.          BackColor       =   &H0080FFFF&
  224.          Caption         =   "Save the Current Graph"
  225.          Height          =   252
  226.          Left            =   540
  227.          TabIndex        =   68
  228.          Top             =   2880
  229.          Width           =   2052
  230.       End
  231.       Begin Label Label16 
  232.          BackColor       =   &H0080FFFF&
  233.          Caption         =   "Clear the Graph"
  234.          Height          =   252
  235.          Left            =   540
  236.          TabIndex        =   66
  237.          Top             =   2520
  238.          Width           =   1692
  239.       End
  240.       Begin Label Label15 
  241.          BackColor       =   &H0080FFFF&
  242.          Caption         =   "Select a Node in the Graph"
  243.          Height          =   252
  244.          Left            =   540
  245.          TabIndex        =   63
  246.          Top             =   1800
  247.          Width           =   2472
  248.       End
  249.       Begin Label Label14 
  250.          BackColor       =   &H0080FFFF&
  251.          Caption         =   "Generate a Random Graph"
  252.          Height          =   252
  253.          Left            =   540
  254.          TabIndex        =   62
  255.          Top             =   1440
  256.          Width           =   2412
  257.       End
  258.       Begin Label Label13 
  259.          BackColor       =   &H0080FFFF&
  260.          Caption         =   "Print the Graph"
  261.          Height          =   252
  262.          Left            =   540
  263.          TabIndex        =   61
  264.          Top             =   720
  265.          Width           =   1572
  266.       End
  267.    End
  268.    Begin PictureBox pctMain 
  269.       Height          =   6192
  270.       Left            =   0
  271.       ScaleHeight     =   6168
  272.       ScaleWidth      =   9408
  273.       TabIndex        =   11
  274.       Top             =   0
  275.       Width           =   9432
  276.       Begin ITGraph ITGraph1 
  277.          ArrangeMode     =   2  'FlowChart
  278.          AutoArrange     =   1  'AutoArrange
  279.          AutoMouseEvents =   ITGDEMO1.FRX:0302
  280.          BackColor       =   &H00C0C0C0&
  281.          DragItems       =   0   'False
  282.          DrawArrows      =   -1  'True
  283.          DrawBackLinks   =   2  'ITG_DashedBackLinks
  284.          DrawColored     =   -1  'True
  285.          DrawConnLabels  =   -1  'True
  286.          DrawDir         =   3  'Top To Bottom
  287.          DrawHandles     =   -1  'True
  288.          DrawItemLabels  =   -1  'True
  289.          DrawScale       =   100
  290.          FillColor       =   &H0000FFFF&
  291.          FontBold        =   -1  'True
  292.          FontItalic      =   0   'False
  293.          FontName        =   "Times New Roman"
  294.          FontSize        =   7.8
  295.          FontStrikethru  =   0   'False
  296.          FontUnderline   =   0   'False
  297.          ForeColor       =   &H00000000&
  298.          Gap             =   10
  299.          GraphicAllowImport=   3  'Delete Design Time Graphics
  300.          Graphics        =   ITGDEMO1.FRX:0332
  301.          Height          =   5292
  302.          Left            =   60
  303.          LineWidth       =   0
  304.          PrintHeader     =   ""
  305.          PrintRectHeight =   -1
  306.          PrintRectLeft   =   -1
  307.          PrintRectTop    =   -1
  308.          PrintRectWidth  =   -1
  309.          Redraw          =   -1  'True
  310.          RubberBand      =   3  'RB For Both
  311.          SelectedIndex   =   -1
  312.          SelectRectEnabled=   -1  'True
  313.          SelectRectHeight=   0
  314.          SelectRectLeft  =   0
  315.          SelectRectTop   =   0
  316.          SelectRectWidth =   0
  317.          StoreGraphics   =   2  'Save Referenced Graphics
  318.          TabIndex        =   81
  319.          Top             =   180
  320.          Width           =   3792
  321.          XSpace          =   20
  322.          XSpan           =   120
  323.          YSpace          =   20
  324.          YSpan           =   50
  325.       End
  326.       Begin PictureBox pctZoomNode 
  327.          AutoSize        =   -1  'True
  328.          BorderStyle     =   0  'None
  329.          DragIcon        =   ITGDEMO1.FRX:0334
  330.          Height          =   384
  331.          Left            =   4560
  332.          Picture         =   ITGDEMO1.FRX:0636
  333.          ScaleHeight     =   384
  334.          ScaleWidth      =   384
  335.          TabIndex        =   79
  336.          Top             =   5580
  337.          Width           =   384
  338.       End
  339.       Begin CommandButton cmdSpecial 
  340.          Caption         =   "&Special"
  341.          Height          =   432
  342.          Left            =   6120
  343.          TabIndex        =   60
  344.          Top             =   5520
  345.          Width           =   1032
  346.       End
  347.       Begin CommonDialog CMDialog1 
  348.          CancelError     =   -1  'True
  349.          Filter          =   "ITGraph Files (*.ITG)|*.ITG"
  350.          FilterIndex     =   1
  351.          HelpCommand     =   1
  352.          HelpFile        =   "ITGraph.HLP"
  353.          Left            =   60
  354.          Top             =   5760
  355.       End
  356.       Begin CommandButton cmdLoadFrom 
  357.          Caption         =   "&LoadFrom"
  358.          Height          =   432
  359.          Left            =   7200
  360.          TabIndex        =   14
  361.          Top             =   5520
  362.          Width           =   1032
  363.       End
  364.       Begin CommandButton cmdQuit 
  365.          Caption         =   "&Quit"
  366.          Height          =   432
  367.          Left            =   8280
  368.          TabIndex        =   13
  369.          Top             =   5520
  370.          Width           =   1032
  371.       End
  372.       Begin CommandButton cmdAddItem 
  373.          Caption         =   "&AddItem"
  374.          Height          =   432
  375.          Left            =   5040
  376.          TabIndex        =   12
  377.          Top             =   5520
  378.          Width           =   1032
  379.       End
  380.       Begin Frame frameProperties 
  381.          Caption         =   "ITGraph Global Properties"
  382.          Height          =   5412
  383.          Left            =   3900
  384.          TabIndex        =   15
  385.          Top             =   60
  386.          Width           =   5412
  387.          Begin PictureBox pctBackColor 
  388.             BackColor       =   &H00C0C0C0&
  389.             Height          =   192
  390.             Left            =   120
  391.             ScaleHeight     =   168
  392.             ScaleWidth      =   168
  393.             TabIndex        =   54
  394.             Top             =   300
  395.             Width           =   192
  396.          End
  397.          Begin PictureBox pctFillColor 
  398.             BackColor       =   &H0000FFFF&
  399.             Height          =   192
  400.             Left            =   120
  401.             ScaleHeight     =   168
  402.             ScaleWidth      =   168
  403.             TabIndex        =   53
  404.             Top             =   540
  405.             Width           =   192
  406.          End
  407.          Begin PictureBox pctForeColor 
  408.             BackColor       =   &H00000000&
  409.             Height          =   192
  410.             Left            =   120
  411.             ScaleHeight     =   168
  412.             ScaleWidth      =   168
  413.             TabIndex        =   52
  414.             Top             =   780
  415.             Width           =   192
  416.          End
  417.          Begin CheckBox chkEnabled 
  418.             Caption         =   "Enabled"
  419.             Height          =   192
  420.             Left            =   120
  421.             TabIndex        =   51
  422.             Top             =   3180
  423.             Value           =   1  'Checked
  424.             Width           =   972
  425.          End
  426.          Begin CheckBox chkVisible 
  427.             Caption         =   "Visible"
  428.             Height          =   192
  429.             Left            =   120
  430.             TabIndex        =   50
  431.             Top             =   3420
  432.             Value           =   1  'Checked
  433.             Width           =   972
  434.          End
  435.          Begin TextBox edtSampleText 
  436.             Alignment       =   2  'Center
  437.             BackColor       =   &H0000FFFF&
  438.             FontBold        =   -1  'True
  439.             FontItalic      =   0   'False
  440.             FontName        =   "Times New Roman"
  441.             FontSize        =   7.8
  442.             FontStrikethru  =   0   'False
  443.             FontUnderline   =   0   'False
  444.             Height          =   372
  445.             Left            =   120
  446.             MultiLine       =   -1  'True
  447.             TabIndex        =   49
  448.             Text            =   "Sample Text"
  449.             Top             =   1020
  450.             Width           =   1512
  451.          End
  452.          Begin HScrollBar hscDrawScale 
  453.             Height          =   195
  454.             Left            =   3300
  455.             Max             =   9999
  456.             TabIndex        =   48
  457.             Top             =   600
  458.             Value           =   100
  459.             Width           =   1455
  460.          End
  461.          Begin TextBox edtDrawScale 
  462.             Height          =   285
  463.             Left            =   4800
  464.             MaxLength       =   4
  465.             TabIndex        =   47
  466.             Text            =   "100"
  467.             Top             =   540
  468.             Width           =   555
  469.          End
  470.          Begin TextBox edtXSpan 
  471.             Height          =   285
  472.             Left            =   4800
  473.             MaxLength       =   3
  474.             TabIndex        =   46
  475.             Text            =   "120"
  476.             Top             =   840
  477.             Width           =   555
  478.          End
  479.          Begin HScrollBar hscXSpan 
  480.             Height          =   195
  481.             Left            =   3300
  482.             Max             =   250
  483.             TabIndex        =   45
  484.             Top             =   900
  485.             Value           =   120
  486.             Width           =   1455
  487.          End
  488.          Begin TextBox edtYSpan 
  489.             Height          =   285
  490.             Left            =   4800
  491.             MaxLength       =   3
  492.             TabIndex        =   44
  493.             Text            =   "50"
  494.             Top             =   1140
  495.             Width           =   555
  496.          End
  497.          Begin HScrollBar hscYSpan 
  498.             Height          =   195
  499.             Left            =   3300
  500.             Max             =   250
  501.             TabIndex        =   43
  502.             Top             =   1200
  503.             Value           =   50
  504.             Width           =   1455
  505.          End
  506.          Begin HScrollBar hscXSpace 
  507.             Height          =   195
  508.             Left            =   3300
  509.             Max             =   250
  510.             TabIndex        =   42
  511.             Top             =   1500
  512.             Value           =   20
  513.             Width           =   1455
  514.          End
  515.          Begin TextBox edtXSpace 
  516.             Height          =   285
  517.             Left            =   4800
  518.             MaxLength       =   3
  519.             TabIndex        =   41
  520.             Text            =   "20"
  521.             Top             =   1440
  522.             Width           =   555
  523.          End
  524.          Begin HScrollBar hscYSpace 
  525.             Height          =   195
  526.             Left            =   3300
  527.             Max             =   250
  528.             TabIndex        =   40
  529.             Top             =   1800
  530.             Value           =   20
  531.             Width           =   1455
  532.          End
  533.          Begin TextBox edtYSpace 
  534.             Height          =   285
  535.             Left            =   4800
  536.             MaxLength       =   3
  537.             TabIndex        =   39
  538.             Text            =   "20"
  539.             Top             =   1740
  540.             Width           =   555
  541.          End
  542.          Begin HScrollBar hscGap 
  543.             Height          =   195
  544.             Left            =   3300
  545.             Max             =   250
  546.             TabIndex        =   38
  547.             Top             =   2100
  548.             Value           =   10
  549.             Width           =   1455
  550.          End
  551.          Begin TextBox edtGap 
  552.             Height          =   285
  553.             Left            =   4800
  554.             MaxLength       =   3
  555.             TabIndex        =   37
  556.             Text            =   "10"
  557.             Top             =   2040
  558.             Width           =   555
  559.          End
  560.          Begin TextBox edtLineWidth 
  561.             Height          =   285
  562.             Left            =   4800
  563.             MaxLength       =   3
  564.             TabIndex        =   36
  565.             Text            =   "0"
  566.             Top             =   2340
  567.             Width           =   555
  568.          End
  569.          Begin HScrollBar hscLineWidth 
  570.             Height          =   195
  571.             Left            =   3300
  572.             Max             =   100
  573.             TabIndex        =   35
  574.             Top             =   2400
  575.             Width           =   1455
  576.          End
  577.          Begin Frame Frame3 
  578.             Caption         =   "ArrangeMode"
  579.             Height          =   1452
  580.             Left            =   2760
  581.             TabIndex        =   30
  582.             Top             =   3840
  583.             Width           =   2532
  584.             Begin OptionButton optArrangeMode 
  585.                Caption         =   "ITG_ModeTree"
  586.                Height          =   252
  587.                Index           =   3
  588.                Left            =   120
  589.                TabIndex        =   34
  590.                TabStop         =   0   'False
  591.                Top             =   1140
  592.                Width           =   1992
  593.             End
  594.             Begin OptionButton optArrangeMode 
  595.                Caption         =   "ITG_ModeFlowChart"
  596.                Height          =   252
  597.                Index           =   2
  598.                Left            =   120
  599.                TabIndex        =   33
  600.                Top             =   840
  601.                Value           =   -1  'True
  602.                Width           =   1992
  603.             End
  604.             Begin OptionButton optArrangeMode 
  605.                Caption         =   "ITG_ModeCompact"
  606.                Height          =   252
  607.                Index           =   1
  608.                Left            =   120
  609.                TabIndex        =   32
  610.                TabStop         =   0   'False
  611.                Top             =   540
  612.                Width           =   1992
  613.             End
  614.             Begin OptionButton optArrangeMode 
  615.                Caption         =   "ITG_ModeHierarchy"
  616.                Height          =   252
  617.                Index           =   0
  618.                Left            =   120
  619.                TabIndex        =   31
  620.                TabStop         =   0   'False
  621.                Top             =   240
  622.                Width           =   1992
  623.             End
  624.          End
  625.          Begin Frame frameAutoArrange 
  626.             Caption         =   "AutoArrange"
  627.             Height          =   1452
  628.             Left            =   120
  629.             TabIndex        =   26
  630.             Top             =   3840
  631.             Width           =   2532
  632.             Begin OptionButton optAutoArrange 
  633.                Caption         =   "ITG_AutoArrange"
  634.                Height          =   252
  635.                Left            =   120
  636.                TabIndex        =   29
  637.                Top             =   540
  638.                Value           =   -1  'True
  639.                Width           =   1812
  640.             End
  641.             Begin OptionButton optManualArrange 
  642.                Caption         =   "ITG_ManualArrange"
  643.                Height          =   252
  644.                Left            =   120
  645.                TabIndex        =   28
  646.                TabStop         =   0   'False
  647.                Top             =   240
  648.                Width           =   2052
  649.             End
  650.             Begin CommandButton cmdArrangeNow 
  651.                Caption         =   "ITG_ArrangeNow"
  652.                Height          =   432
  653.                Left            =   360
  654.                TabIndex        =   27
  655.                Top             =   900
  656.                Width           =   1812
  657.             End
  658.          End
  659.          Begin CheckBox chkDrawConnLabels 
  660.             Caption         =   "DrawConnLabels"
  661.             Height          =   192
  662.             Left            =   120
  663.             TabIndex        =   25
  664.             Top             =   2460
  665.             Value           =   1  'Checked
  666.             Width           =   1752
  667.          End
  668.          Begin CheckBox chkDrawItemLabels 
  669.             Caption         =   "DrawItemLabels"
  670.             Height          =   192
  671.             Left            =   120
  672.             TabIndex        =   24
  673.             Top             =   2940
  674.             Value           =   1  'Checked
  675.             Width           =   1692
  676.          End
  677.          Begin CheckBox chkDrawBackLinks 
  678.             Caption         =   "DrawBackLinks"
  679.             Height          =   192
  680.             Left            =   120
  681.             TabIndex        =   23
  682.             Top             =   1740
  683.             Value           =   1  'Checked
  684.             Width           =   1632
  685.          End
  686.          Begin CheckBox chkDrawHandles 
  687.             Caption         =   "DrawHandles"
  688.             Height          =   192
  689.             Left            =   120
  690.             TabIndex        =   22
  691.             Top             =   2700
  692.             Value           =   1  'Checked
  693.             Width           =   1452
  694.          End
  695.          Begin ComboBox cmbDrawDir 
  696.             Height          =   288
  697.             Left            =   3300
  698.             Style           =   2  'Dropdown List
  699.             TabIndex        =   21
  700.             Top             =   240
  701.             Width           =   1992
  702.          End
  703.          Begin ComboBox cmbRubberBand 
  704.             Height          =   300
  705.             Left            =   3300
  706.             Style           =   2  'Dropdown List
  707.             TabIndex        =   20
  708.             Top             =   2700
  709.             Width           =   2055
  710.          End
  711.          Begin CheckBox chkDrawArrows 
  712.             Caption         =   "DrawArrows"
  713.             Height          =   192
  714.             Left            =   120
  715.             TabIndex        =   19
  716.             Top             =   1500
  717.             Value           =   1  'Checked
  718.             Width           =   1452
  719.          End
  720.          Begin CheckBox chkZoomOnSelectRect 
  721.             Caption         =   "Zoom On SelectRect"
  722.             Height          =   252
  723.             Left            =   3300
  724.             TabIndex        =   18
  725.             Top             =   3000
  726.             Value           =   1  'Checked
  727.             Width           =   2052
  728.          End
  729.          Begin CheckBox chkDrawColored 
  730.             Caption         =   "DrawColored"
  731.             Height          =   192
  732.             Left            =   120
  733.             TabIndex        =   17
  734.             Top             =   2220
  735.             Value           =   1  'Checked
  736.             Width           =   1392
  737.          End
  738.          Begin CheckBox chkDashed 
  739.             Caption         =   "Dashed"
  740.             Height          =   192
  741.             Left            =   360
  742.             TabIndex        =   16
  743.             Top             =   1980
  744.             Value           =   1  'Checked
  745.             Width           =   972
  746.          End
  747.          Begin Label Label1 
  748.             Caption         =   "BackColor"
  749.             Height          =   192
  750.             Left            =   360
  751.             TabIndex        =   0
  752.             Top             =   300
  753.             Width           =   972
  754.          End
  755.          Begin Label Label2 
  756.             Caption         =   "FillColor"
  757.             Height          =   192
  758.             Left            =   360
  759.             TabIndex        =   1
  760.             Top             =   540
  761.             Width           =   972
  762.          End
  763.          Begin Label Label3 
  764.             Caption         =   "ForeColor"
  765.             Height          =   192
  766.             Left            =   360
  767.             TabIndex        =   2
  768.             Top             =   780
  769.             Width           =   972
  770.          End
  771.          Begin Label lblDrawScale 
  772.             Alignment       =   1  'Right Justify
  773.             Caption         =   "DrawScale:"
  774.             Height          =   192
  775.             Left            =   2220
  776.             TabIndex        =   3
  777.             Top             =   600
  778.             Width           =   1032
  779.          End
  780.          Begin Label lblXSpan 
  781.             Alignment       =   1  'Right Justify
  782.             Caption         =   "XSpan:"
  783.             Height          =   192
  784.             Left            =   2580
  785.             TabIndex        =   4
  786.             Top             =   900
  787.             Width           =   672
  788.          End
  789.          Begin Label lblYSpan 
  790.             Alignment       =   1  'Right Justify
  791.             Caption         =   "YSpan:"
  792.             Height          =   192
  793.             Left            =   2580
  794.             TabIndex        =   5
  795.             Top             =   1200
  796.             Width           =   672
  797.          End
  798.          Begin Label lblXSpace 
  799.             Alignment       =   1  'Right Justify
  800.             Caption         =   "XSpace:"
  801.             Height          =   192
  802.             Left            =   2460
  803.             TabIndex        =   6
  804.             Top             =   1500
  805.             Width           =   792
  806.          End
  807.          Begin Label lblYSpace 
  808.             Alignment       =   1  'Right Justify
  809.             Caption         =   "YSpace:"
  810.             Height          =   192
  811.             Left            =   2520
  812.             TabIndex        =   7
  813.             Top             =   1800
  814.             Width           =   732
  815.          End
  816.          Begin Label lblGap 
  817.             Alignment       =   1  'Right Justify
  818.             Caption         =   "Gap:"
  819.             Height          =   192
  820.             Left            =   2760
  821.             TabIndex        =   8
  822.             Top             =   2100
  823.             Width           =   492
  824.          End
  825.          Begin Label lblLineWidth 
  826.             Alignment       =   1  'Right Justify
  827.             Caption         =   "LineWidth:"
  828.             Height          =   192
  829.             Left            =   2280
  830.             TabIndex        =   9
  831.             Top             =   2400
  832.             Width           =   972
  833.          End
  834.          Begin Label lblDrawDir 
  835.             Caption         =   "DrawDir:"
  836.             Height          =   192
  837.             Left            =   2520
  838.             TabIndex        =   10
  839.             Top             =   300
  840.             Width           =   732
  841.          End
  842.          Begin Label Label12 
  843.             Alignment       =   1  'Right Justify
  844.             Caption         =   "RubberBand:"
  845.             Height          =   192
  846.             Left            =   2100
  847.             TabIndex        =   55
  848.             Top             =   2760
  849.             Width           =   1152
  850.          End
  851.       End
  852.       Begin Label lblUnderCursor 
  853.          BorderStyle     =   1  'Fixed Single
  854.          Caption         =   "<None>"
  855.          FontBold        =   0   'False
  856.          FontItalic      =   0   'False
  857.          FontName        =   "MS Serif"
  858.          FontSize        =   7.8
  859.          FontStrikethru  =   0   'False
  860.          FontUnderline   =   0   'False
  861.          Height          =   492
  862.          Left            =   1320
  863.          TabIndex        =   74
  864.          Top             =   5580
  865.          Width           =   3132
  866.       End
  867.       Begin Label Label20 
  868.          Caption         =   "Under cursor:"
  869.          Height          =   252
  870.          Left            =   60
  871.          TabIndex        =   73
  872.          Top             =   5580
  873.          Width           =   1212
  874.       End
  875.    End
  876.    Begin Label Label5 
  877.       BackColor       =   &H0080FFFF&
  878.       Caption         =   "Select a Node in the Graph"
  879.       Height          =   252
  880.       Left            =   420
  881.       TabIndex        =   82
  882.       Top             =   60
  883.       Width           =   2472
  884.    End
  885. Declare Function GetDC% Lib "User" (ByVal hWnd%)
  886. Declare Sub ReleaseDC Lib "User" (ByVal hWnd%, ByVal hDC%)
  887. Sub chkDashed_Click ()
  888.   If chkDashed.Value Then
  889.     ITGraph1.DrawBackLinks = ITG_DashedBackLinks
  890.   Else
  891.     ITGraph1.DrawBackLinks = ITG_SolidBackLinks
  892.   End If
  893. End Sub
  894. Sub chkDrawArrows_Click ()
  895.   ITGraph1.DrawArrows = chkDrawArrows.Value
  896. End Sub
  897. Sub chkDrawBackLinks_Click ()
  898.   If chkDrawBackLinks.Value Then
  899.     chkDashed.Enabled = True
  900.     If chkDashed.Value Then
  901.       ITGraph1.DrawBackLinks = ITG_DashedBackLinks
  902.     Else
  903.       ITGraph1.DrawBackLinks = ITG_SolidBackLinks
  904.     End If
  905.   Else
  906.     chkDashed.Enabled = False
  907.     ITGraph1.DrawBackLinks = ITG_NoBackLinks
  908.   End If
  909. End Sub
  910. Sub chkDrawColored_Click ()
  911.   ITGraph1.DrawColored = chkDrawColored.Value
  912. End Sub
  913. Sub chkDrawConnLabels_Click ()
  914.   ITGraph1.DrawConnLabels = chkDrawConnLabels.Value
  915. End Sub
  916. Sub chkDrawHandles_Click ()
  917.   ITGraph1.DrawHandles = chkDrawHandles.Value
  918. End Sub
  919. Sub chkDrawItemLabels_Click ()
  920.   ITGraph1.DrawItemLabels = chkDrawItemLabels.Value
  921. End Sub
  922. Sub chkEnabled_Click ()
  923.   ITGraph1.Enabled = chkEnabled.Value
  924. End Sub
  925. Sub chkRedraw_Click ()
  926.   'Setting Redraw to 1 may cause the graph to be redrawn
  927.   'This may take a while, so we show the hourglass
  928.   Screen.MousePointer = 11
  929.   ITGraph1.Redraw = chkRedraw.Value
  930.   Screen.MousePointer = 0
  931. End Sub
  932. Sub chkVisible_Click ()
  933.   ITGraph1.Visible = chkVisible.Value
  934. End Sub
  935. Sub cmbDrawDir_Click ()
  936.   ITGraph1.DrawDir = cmbDrawDir.ListIndex
  937. End Sub
  938. Sub cmbRubberBand_Click ()
  939.   ITGraph1.RubberBand = cmbRubberBand.ListIndex
  940. End Sub
  941. Sub cmdAddItem_Click ()
  942.   frmPlayground.Enabled = False
  943.   frmItemProperties!txtListIndex.Caption = ""
  944.   frmItemProperties.Show
  945. End Sub
  946. Sub cmdArrangeNow_Click ()
  947.   ITGraph1.AutoArrange = ITG_ArrangeNow
  948.   optManualArrange.Value = 1
  949. End Sub
  950. Sub cmdCancel_Click ()
  951.   pctSpecialMenu.Visible = False
  952.   pctSpecialMenu.Enabled = True
  953.   pctMain.Enabled = True
  954. End Sub
  955. Sub cmdClear_Click ()
  956.   ITGraph1.Clear
  957.   pctSpecialMenu.Visible = False
  958.   pctMain.Enabled = True
  959. End Sub
  960. Sub cmdCommand_Click ()
  961.   txtTransferTarget.Visible = True
  962.   'Setting SelectRectWidth and SelectRectHeight to 0
  963.   'selects the entire graph.
  964.   ITGraph1.SelectRectWidth = 0
  965.   ITGraph1.SelectRectHeight = 0
  966.   'Setting PrintRectWidth and PrintRectHeight to 0
  967.   'fills the entire control window.
  968.   ITGraph1.PrintRectWidth = 0
  969.   ITGraph1.PrintRectHeight = 0
  970.   ITGraph1.PrintToWnd = txtTransferTarget.hWnd
  971.   txtTransferTarget.SetFocus
  972. End Sub
  973. Sub cmdConnectionInfo_Click ()
  974.   Dim i%
  975.   'To get all the connections, we will iterate through the
  976.   'nodes of the graph, retrieving all targets for each node.
  977.   'The ITG_QueryTargets query gets all connections from the
  978.   'node specified by QueryItem to another node.
  979.   'We store the ConnectionId in the ItemData of the list so
  980.   'we can later look up the connection.
  981.   lstConnectionInfo.Clear
  982.   For i = 0 To ITGraph1.ListCount - 1
  983.     ITGraph1.QueryItem = i
  984.     ITGraph1.QueryState = ITG_QueryGetTargets
  985.     While ITGraph1.QueryState
  986.       If ITGraph1.ConnectionLabel = "" Then
  987.     lstConnectionInfo.AddItem "[" & Format$(ITGraph1.ConnectionId) & "]"
  988.       Else
  989.     lstConnectionInfo.AddItem ITGraph1.ConnectionLabel
  990.       End If
  991.       lstConnectionInfo.ItemData(lstConnectionInfo.NewIndex) = ITGraph1.ConnectionId
  992.       ITGraph1.QueryState = ITG_QueryIterate
  993.     Wend
  994.   Next i
  995.   lstConnectionInfo.Visible = True
  996.   lstConnectionInfo.SetFocus
  997. End Sub
  998. Sub cmdFitToWindow_Click ()
  999.   'Setting DrawScale to 0 scales the graph to the control window.
  1000.   ITGraph1.DrawScale = 0
  1001.   pctSpecialMenu.Visible = False
  1002.   pctMain.Enabled = True
  1003. End Sub
  1004. Sub cmdGenRandom_Click ()
  1005.   'Create a random graph with five nodes and five connections
  1006.   Dim oldRedraw%, n%, c%, ix1%, ix2%
  1007.   'Save the Redraw state, and set to false.  This prevents
  1008.   'the graph from updating until all changes are done.
  1009.   oldRedraw% = ITGraph1.Redraw
  1010.   ITGraph1.Redraw = False
  1011.   Screen.MousePointer = 11
  1012.   ITGraph1.Clear
  1013.   For n = 1 To 5
  1014.     ITGraph1.AddItem "Node " & Format$(ITGraph1.ListCount + 1)
  1015.   Next n
  1016.   n = ITGraph1.ListCount
  1017.   For c = 1 To 5
  1018.     ix1 = Int(ITGraph1.ListCount * Rnd(1))
  1019.     ix2 = Int(ITGraph1.ListCount * Rnd(1))
  1020.     ITGraph1.ConnectTo(ix1) = ix2
  1021.     ITGraph1.ConnectionLabel = "(" & Format$(ix1) & "," & Format$(ix2) & ")"
  1022.     ITGraph1.ConnectFromHandle = Int(4 * Rnd(1)) + 1
  1023.     ITGraph1.ConnectToHandle = Int(4 * Rnd(1)) + 1
  1024.   Next c
  1025.   ITGraph1.Redraw = oldRedraw
  1026.   Screen.MousePointer = 0
  1027.   pctSpecialMenu.Visible = False
  1028.   pctMain.Enabled = True
  1029. End Sub
  1030. Sub cmdLoadFrom_Click ()
  1031.   'Load an ITGraph graph file, and set the Property Playground
  1032.   'controls to correspond to the loaded graph.
  1033.   On Error GoTo cmdLoadFrom_Error
  1034.   CMDialog1.Action = 1
  1035.   ITGraph1.LoadFrom = CMDialog1.Filename
  1036.   pctBackColor.BackColor = ITGraph1.BackColor
  1037.   pctFillColor.BackColor = ITGraph1.FillColor
  1038.   pctForeColor.BackColor = ITGraph1.ForeColor
  1039.   edtSampleText.BackColor = ITGraph1.FillColor
  1040.   edtSampleText.ForeColor = ITGraph1.ForeColor
  1041.   edtSampleText.FontName = ITGraph1.FontName
  1042.   edtSampleText.FontSize = ITGraph1.FontSize
  1043.   edtSampleText.FontBold = ITGraph1.FontBold
  1044.   edtSampleText.FontItalic = ITGraph1.FontItalic
  1045.   edtSampleText.FontStrikethru = ITGraph1.FontStrikethru
  1046.   edtSampleText.FontUnderline = ITGraph1.FontUnderline
  1047.   chkDrawColored.Value = Abs(ITGraph1.DrawColored)
  1048.   chkDrawConnLabels.Value = Abs(ITGraph1.DrawConnLabels)
  1049.   chkDrawItemLabels.Value = Abs(ITGraph1.DrawItemLabels)
  1050.   If ITGraph1.DrawBackLinks = ITG_NoBackLinks Then
  1051.     chkDrawBackLinks.Value = False
  1052.     chkDashed.Value = False
  1053.     chkDashed.Enabled = False
  1054.   Else
  1055.     chkDrawBackLinks.Value = 1
  1056.     chkDashed.Enabled = True
  1057.     If ITGraph1.DrawBackLinks = ITG_DashedBackLinks Then
  1058.       chkDashed.Value = 1
  1059.     Else
  1060.       chkDashed.Value = 0
  1061.     End If
  1062.   End If
  1063.   chkDrawHandles.Value = Abs(ITGraph1.DrawHandles)
  1064.   chkDrawArrows.Value = Abs(ITGraph1.DrawArrows)
  1065.   cmbDrawDir.ListIndex = ITGraph1.DrawDir
  1066.   hscDrawScale.Value = ITGraph1.DrawScale
  1067.   edtDrawScale.Text = ITGraph1.DrawScale
  1068.   hscXSpan.Value = ITGraph1.XSpan
  1069.   edtXSpan.Text = ITGraph1.XSpan
  1070.   hscYSpan.Value = ITGraph1.YSpan
  1071.   edtYSpan.Text = ITGraph1.YSpan
  1072.   hscXSpace.Value = ITGraph1.XSpace
  1073.   edtXSpace.Text = ITGraph1.XSpace
  1074.   hscYSpace.Value = ITGraph1.YSpace
  1075.   edtYSpace.Text = ITGraph1.YSpace
  1076.   hscGap.Value = ITGraph1.Gap
  1077.   edtGap.Text = ITGraph1.Gap
  1078.   hscLineWidth.Value = ITGraph1.LineWidth
  1079.   edtLineWidth.Text = ITGraph1.LineWidth
  1080.   cmbRubberBand.ListIndex = ITGraph1.RubberBand
  1081.   optArrangeMode(ITGraph1.ArrangeMode) = True
  1082.   If ITGraph1.AutoArrange = ITG_AutoArrange Then
  1083.     optAutoArrange.Value = True
  1084.   Else
  1085.     optManualArrange.Value = True
  1086.   End If
  1087. cmdLoadFrom_Error:
  1088.   Exit Sub
  1089. End Sub
  1090. Sub cmdPrintGraph_Click ()
  1091.   'Print the graph in its current scale.
  1092.   'The PrintHeader below will print "ITGraph Property Playground"
  1093.   'in the top center (position &2), today's date in the top right
  1094.   '(position &3), and "Page p of n", where p is the page number
  1095.   'and n is the number of pages, in the bottom center (position &5).
  1096.   ITGraph1.PrintHeader = "&2ITGraph Property Playground&3" & Date & "&5Page &p of &n"
  1097.   On Error GoTo cmdPrintGraph_Error
  1098.   CMDialog1.Flags = &H100& + &H8& + &H4&
  1099.   CMDialog1.Action = 5
  1100.   ITGraph1.PrintGraph = CMDialog1.hDC
  1101.   pctSpecialMenu.Visible = False
  1102.   pctMain.Enabled = True
  1103.   Exit Sub
  1104. cmdPrintGraph_Error:
  1105.   Exit Sub
  1106. End Sub
  1107. Sub cmdPrintReport_Click ()
  1108.     Dim iLeft%, iTop%, iWidth%, iHeight%
  1109.     Dim TwipsPerInch%, InsetTwips%
  1110.     Dim oldDrawColored%
  1111.     TwipsPerInch = 1440
  1112.     InsetTwips = TwipsPerInch / 8 'Inset Graph 1/8" from border
  1113.     Screen.MousePointer = 11
  1114.     Printer.Print
  1115.     Printer.Print "ITGraph Property Playground"
  1116.     Printer.Print "Current Graph and Associated Statistics"
  1117.     Printer.Print
  1118.     iLeft = Printer.CurrentX
  1119.     iTop = Printer.CurrentY
  1120.     iWidth = 4 * TwipsPerInch
  1121.     iHeight = 2 * TwipsPerInch
  1122.     Printer.Line (iLeft, iTop)-Step(iWidth, iHeight), , B
  1123.     oldDrawColored = ITGraph1.DrawColored
  1124.     ITGraph1.DrawColored = False
  1125.     ITGraph1.PrintToDC = 0 'Select Entire Graph
  1126.     ITGraph1.PrintRectLeft = (iLeft + InsetTwips) / Printer.TwipsPerPixelX
  1127.     ITGraph1.PrintRectTop = (iTop + InsetTwips) / Printer.TwipsPerPixelY
  1128.     ITGraph1.PrintRectWidth = (iWidth - 2 * InsetTwips) / Printer.TwipsPerPixelX
  1129.     ITGraph1.PrintRectHeight = (iHeight - 2 * InsetTwips) / Printer.TwipsPerPixelY
  1130.     ITGraph1.PrintToDC = Printer.hDC
  1131.     ITGraph1.DrawColored = oldDrawColored
  1132.     Printer.CurrentX = iLeft
  1133.     Printer.CurrentY = iTop + iHeight
  1134.     Printer.Print
  1135.     Printer.Print "The Graph Contains " & CStr(ITGraph1.ListCount) & " Nodes"
  1136.     For i = 0 To ITGraph1.ListCount - 1
  1137.     Printer.Print "    Node " & CStr(i) & ": " & ITGraph1.List(i)
  1138.     Next i
  1139.     Printer.EndDoc
  1140.     pctSpecialMenu.Visible = False
  1141.     pctMain.Enabled = True
  1142.     Screen.MousePointer = 0
  1143. End Sub
  1144. Sub cmdQuit_Click ()
  1145.   End
  1146. End Sub
  1147. Sub cmdSaveAs_Click ()
  1148.   On Error GoTo cmdSaveAs_Error
  1149.   CMDialog1.Action = 2
  1150.   ITGraph1.SaveAs = CMDialog1.Filename
  1151.   pctSpecialMenu.Visible = False
  1152.   pctMain.Enabled = True
  1153. cmdSaveAs_Error:
  1154.   pctSpecialMenu.Visible = False
  1155.   pctMain.Enabled = True
  1156.   Exit Sub
  1157. End Sub
  1158. Sub cmdSelectNode_Click ()
  1159.   'Fill the lstSelectNode list with the node names.
  1160.   lstSelectNode.Clear
  1161.   For i = 0 To ITGraph1.ListCount - 1
  1162.     lstSelectNode.AddItem ITGraph1.List(i)
  1163.     lstSelectNode.ItemData(lstSelectNode.NewIndex) = i
  1164.   Next i
  1165.   lstSelectNode.Visible = True
  1166.   lstSelectNode.SetFocus
  1167. End Sub
  1168. Sub cmdSpecial_Click ()
  1169.   pctMain.Enabled = False
  1170.   pctSpecialMenu.Visible = True
  1171. End Sub
  1172. Sub edtDrawScale_LostFocus ()
  1173.   If Val(edtDrawScale.Text) > hscDrawScale.Max Then
  1174.     hscDrawScale.Value = hscDrawScale.Max
  1175.   Else
  1176.     hscDrawScale.Value = Val(edtDrawScale.Text)
  1177.   End If
  1178. End Sub
  1179. Sub edtGap_Change ()
  1180.   hscGap.Value = Val(edtGap.Text)
  1181.   ITGraph1.Gap = Val(edtGap.Text)
  1182. End Sub
  1183. Sub edtLineWidth_Change ()
  1184.   hscLineWidth.Value = Val(edtLineWidth.Text)
  1185.   ITGraph1.LineWidth = Val(edtLineWidth.Text)
  1186. End Sub
  1187. Sub edtSampleText_Click ()
  1188.   Const CF_BOTH = &H3&
  1189.   Const CF_EFFECTS = &H100&
  1190.   On Error GoTo edtSampleText_Error
  1191.   CMDialog1.Flags = CF_BOTH Or CF_EFFECTS
  1192.   CMDialog1.FontName = ITGraph1.FontName
  1193.   CMDialog1.FontSize = ITGraph1.FontSize
  1194.   CMDialog1.FontBold = ITGraph1.FontBold
  1195.   CMDialog1.FontItalic = ITGraph1.FontItalic
  1196.   CMDialog1.FontUnderline = ITGraph1.FontUnderline
  1197.   CMDialog1.FontStrikethru = ITGraph1.FontStrikethru
  1198.   CMDialog1.Color = ITGraph1.ForeColor
  1199.   CMDialog1.Action = 4
  1200.   ITGraph1.FontName = CMDialog1.FontName
  1201.   ITGraph1.FontSize = CMDialog1.FontSize
  1202.   ITGraph1.FontBold = CMDialog1.FontBold
  1203.   ITGraph1.FontItalic = CMDialog1.FontItalic
  1204.   ITGraph1.FontUnderline = CMDialog1.FontUnderline
  1205.   ITGraph1.FontStrikethru = CMDialog1.FontStrikethru
  1206.   ITGraph1.ForeColor = CMDialog1.Color
  1207.   edtSampleText.FontName = CMDialog1.FontName
  1208.   edtSampleText.FontSize = CMDialog1.FontSize
  1209.   edtSampleText.FontBold = CMDialog1.FontBold
  1210.   edtSampleText.FontItalic = CMDialog1.FontItalic
  1211.   edtSampleText.FontUnderline = CMDialog1.FontUnderline
  1212.   edtSampleText.FontStrikethru = CMDialog1.FontStrikethru
  1213.   edtSampleText.ForeColor = CMDialog1.Color
  1214.   pctForeColor.BackColor = CMDialog1.Color
  1215. edtSampleText_Error:
  1216.   Exit Sub
  1217. End Sub
  1218. Sub edtSampleText_GotFocus ()
  1219.   ITGraph1.SetFocus
  1220. End Sub
  1221. Sub edtXSpace_Change ()
  1222.   hscXSpace.Value = Val(edtXSpace.Text)
  1223.   ITGraph1.XSpace = Val(edtXSpace.Text)
  1224. End Sub
  1225. Sub edtXSpan_Change ()
  1226.   hscXSpan.Value = Val(edtXSpan.Text)
  1227.   ITGraph1.XSpan = Val(edtXSpan.Text)
  1228. End Sub
  1229. Sub edtYSpace_Change ()
  1230.   hscYSpace.Value = Val(edtYSpace.Text)
  1231.   ITGraph1.YSpace = Val(edtYSpace.Text)
  1232. End Sub
  1233. Sub edtYSpan_Change ()
  1234.   hscYSpan.Value = Val(edtYSpan.Text)
  1235.   ITGraph1.YSpan = Val(edtYSpan.Text)
  1236. End Sub
  1237. Sub Form_Load ()
  1238.   Dim deltaX As Single, deltaY As Single
  1239.   deltaX = (Screen.Width - Me.Width) / 2 - Me.Left
  1240.   deltaY = (Screen.Height - Me.Height) / 3 - Me.Top
  1241.   Me.Left = Me.Left + deltaX
  1242.   Me.Top = Me.Top + deltaY
  1243.   frmItemProperties.Left = frmItemProperties.Left + deltaX
  1244.   frmItemProperties.Top = frmItemProperties.Top + deltaY
  1245.   frmConnectionProperties.Left = frmConnectionProperties.Left + deltaX
  1246.   frmConnectionProperties.Top = frmConnectionProperties.Top + deltaY
  1247.   cmbDrawDir.Clear
  1248.   cmbDrawDir.AddItem "ITG_RightToLeft"
  1249.   cmbDrawDir.AddItem "ITG_LeftToRight"
  1250.   cmbDrawDir.AddItem "ITG_BottomToTop"
  1251.   cmbDrawDir.AddItem "ITG_TopToBottom"
  1252.   cmbDrawDir.ListIndex = ITG_TopToBottom
  1253.   cmbRubberBand.Clear
  1254.   cmbRubberBand.AddItem "ITG_RBNone"
  1255.   cmbRubberBand.AddItem "ITG_RBItems"
  1256.   cmbRubberBand.AddItem "ITG_RBHandles"
  1257.   cmbRubberBand.AddItem "ITG_RBBoth"
  1258.   cmbRubberBand.ListIndex = ITG_RBBoth
  1259.   ITGraph1.AddItem "Node #1"
  1260.   ITGraph1.AddItem "Node #2"
  1261.   ITGraph1.ConnectTo(0) = 1
  1262.   ITGraph1.ConnectionLabel = "Connection"
  1263. End Sub
  1264. Sub hscDrawScale_Change ()
  1265.   edtDrawScale.Text = hscDrawScale.Value
  1266.   If ITGraph1.DrawScale <> hscDrawScale.Value Then
  1267.     ITGraph1.DrawScale = hscDrawScale.Value
  1268.   End If
  1269. End Sub
  1270. Sub hscGap_Change ()
  1271.   edtGap.Text = hscGap.Value
  1272.   ITGraph1.Gap = hscGap.Value
  1273. End Sub
  1274. Sub hscLineWidth_Change ()
  1275.   edtLineWidth.Text = hscLineWidth.Value
  1276.   ITGraph1.LineWidth = hscLineWidth.Value
  1277. End Sub
  1278. Sub hscXSpace_Change ()
  1279.   edtXSpace.Text = hscXSpace.Value
  1280.   ITGraph1.XSpace = hscXSpace.Value
  1281. End Sub
  1282. Sub hscXSpan_Change ()
  1283.   edtXSpan.Text = hscXSpan.Value
  1284.   ITGraph1.XSpan = hscXSpan.Value
  1285. End Sub
  1286. Sub hscYSpace_Change ()
  1287.   edtYSpace.Text = hscYSpace.Value
  1288.   ITGraph1.YSpace = hscYSpace.Value
  1289. End Sub
  1290. Sub hscYSpan_Change ()
  1291.   edtYSpan.Text = hscYSpan.Value
  1292.   ITGraph1.YSpan = hscYSpan.Value
  1293. End Sub
  1294. Sub ITGraph1_Click (Button As Integer, Shift As Integer, X As Integer, Y As Integer)
  1295.     ITGraph1.SelectedIndex = -1
  1296. End Sub
  1297. Sub ITGraph1_DblClick (Button As Integer, Shift As Integer, X As Integer, Y As Integer)
  1298.   ITGraph1.DrawScale = 0
  1299.   hscDrawScale.Value = ITGraph1.DrawScale
  1300. End Sub
  1301. Sub ITGraph1_DragDrop (Source As Control, X As Single, Y As Single)
  1302.   X = X / Screen.TwipsPerPixelX
  1303.   Y = Y / Screen.TwipsPerPixelY
  1304.   If Source = pctZoomNode Then
  1305.     ITGraph1.QueryState = ITG_QueryGetSelectRectItems
  1306.     If ITGraph1.QueryState Then
  1307.       ITGraph1.SelectRectLeft = ITGraph1.ItemXpos(ITGraph1.QueryItem) - ITGraph1.XSpan / 2
  1308.       ITGraph1.SelectRectTop = ITGraph1.ItemYpos(ITGraph1.QueryItem) - ITGraph1.YSpan / 2
  1309.       ITGraph1.SelectRectWidth = 2 * ITGraph1.XSpan
  1310.       ITGraph1.SelectRectHeight = 2 * ITGraph1.YSpan
  1311.       ITGraph1.ZoomSelectRect = 1
  1312.     Else
  1313.       ITGraph1.SelectRectLeft = X - 1.5 * ITGraph1.XSpan
  1314.       ITGraph1.SelectRectTop = Y - 1.5 * ITGraph1.YSpan
  1315.       ITGraph1.SelectRectWidth = 3 * ITGraph1.XSpan
  1316.       ITGraph1.SelectRectHeight = 3 * ITGraph1.YSpan
  1317.       ITGraph1.ZoomSelectRect = 1
  1318.     End If
  1319.   End If
  1320. End Sub
  1321. Sub ITGraph1_DragOver (Source As Control, X As Single, Y As Single, State As Integer)
  1322.   X = X / Screen.TwipsPerPixelX
  1323.   Y = Y / Screen.TwipsPerPixelY
  1324.   If Source = pctZoomNode Then
  1325.     ITGraph1.SelectRectLeft = X
  1326.     ITGraph1.SelectRectTop = Y
  1327.     ITGraph1.SelectRectWidth = 0
  1328.     ITGraph1.SelectRectHeight = 0
  1329.     ITGraph1.QueryState = ITG_QueryGetSelectRectItems
  1330.     If ITGraph1.QueryState Then
  1331.       lblUnderCursor.Caption = ITGraph1.List(ITGraph1.QueryItem)
  1332.     Else
  1333.       lblUnderCursor.Caption = "<None>"
  1334.     End If
  1335.   End If
  1336. End Sub
  1337. Sub ITGraph1_ItemClick (ItemIx As Integer, ItemHandle As Integer, Button As Integer, Shift As Integer, X As Integer, Y As Integer)
  1338.   If ItemHandle = 0 Then
  1339.     ITGraph1.SelectedIndex = ItemIx
  1340.     ITGraph1.SetFocus
  1341.     If Shift And ITG_CtrlDown Then
  1342.     ITGraph1.ItemIndex(ItemIx) = 0
  1343.     End If
  1344.   End If
  1345. End Sub
  1346. Sub ITGraph1_ItemConnect (FromIx As Integer, FromHandle As Integer, ToIx As Integer, ToHandle As Integer, Button As Integer, Shift As Integer)
  1347.   frmPlayground.Enabled = False
  1348.   frmConnectionProperties!edtConnectFromIndex = Format$(FromIx)
  1349.   If FromHandle <> 0 Then
  1350.     frmConnectionProperties!edtConnectFromHandle = Format$(FromHandle)
  1351.   Else
  1352.     frmConnectionProperties!edtConnectFromHandle = "3"
  1353.   End If
  1354.   frmConnectionProperties!edtConnectToIndex = Format$(ToIx)
  1355.   If ToHandle <> 0 Then
  1356.     frmConnectionProperties!edtConnectToHandle = Format$(ToHandle)
  1357.   Else
  1358.     frmConnectionProperties!edtConnectToHandle = "1"
  1359.   End If
  1360.   frmConnectionProperties!txtNewConnection.Caption = "NEW"
  1361.   frmConnectionProperties.Show
  1362. End Sub
  1363. Sub ITGraph1_ItemDblClick (ItemIx As Integer, ItemHandle As Integer, Button As Integer, Shift As Integer, X As Integer, Y As Integer)
  1364.   If ItemHandle = 0 Then
  1365.     frmPlayground.Enabled = False
  1366.     frmItemProperties!txtListIndex.Caption = ItemIx
  1367.     frmItemProperties.Show
  1368.   End If
  1369. End Sub
  1370. Sub ITGraph1_ItemMouseMove (ItemIx As Integer, ItemHandle As Integer, IsDragging As Integer, Button As Integer, Shift As Integer, X As Integer, Y As Integer)
  1371.   If ItemIx = -1 Then
  1372.     lblUnderCursor = "<None>"
  1373.   Else
  1374.     If ItemHandle = 0 Then
  1375.       lblUnderCursor.Caption = ITGraph1.List(ItemIx)
  1376.     Else
  1377.       lblUnderCursor.Caption = ITGraph1.List(ItemIx) & "[" & Format$(ItemHandle) & "]"
  1378.     End If
  1379.   End If
  1380. End Sub
  1381. Sub ITGraph1_KeyPress (KeyAscii As Integer)
  1382.   Dim nodeStr$
  1383.   If (ITGraph1.SelectedIndex >= 0) And (ITGraph1.SelectedIndex < ITGraph1.ListCount) Then
  1384.     nodeStr = ITGraph1.List(ITGraph1.SelectedIndex)
  1385.     If KeyAscii = 8 Then
  1386.       If Len(nodeStr) > 0 Then
  1387.     nodeStr = Left$(nodeStr, Len(nodeStr) - 1)
  1388.       End If
  1389.     Else
  1390.       nodeStr = nodeStr & Chr$(KeyAscii)
  1391.     End If
  1392.     ITGraph1.List(ITGraph1.SelectedIndex) = nodeStr
  1393.   End If
  1394. End Sub
  1395. Sub ITGraph1_LineDblClick (FromIx As Integer, ToIx As Integer, Button As Integer, Shift As Integer, X As Integer, Y As Integer)
  1396.   If (FromIx <> -1) And (ToIx <> -1) Then
  1397.     frmPlayground.Enabled = False
  1398.     frmConnectionProperties!edtConnectFromIndex = Format$(FromIx)
  1399.     frmConnectionProperties!edtConnectToIndex = Format$(ToIx)
  1400.     frmConnectionProperties!txtNewConnection.Caption = ""
  1401.     frmConnectionProperties.Show
  1402.   ElseIf FromIx <> -1 Then
  1403.     MsgBox "This connection has multiple targets.  Please select the target from the source's target list."
  1404.     frmPlayground.Enabled = False
  1405.     frmItemProperties!txtListIndex.Caption = FromIx
  1406.     frmItemProperties.Show
  1407.     DoEvents
  1408.     frmItemProperties!lstTargets.ListIndex = 0
  1409.     frmItemProperties!lstTargets.SetFocus
  1410.   ElseIf ToIx <> -1 Then
  1411.     MsgBox "This connection has multiple sources.  Please select the source from the target's source list."
  1412.     frmPlayground.Enabled = False
  1413.     frmItemProperties!txtListIndex.Caption = ToIx
  1414.     frmItemProperties.Show
  1415.     DoEvents
  1416.     frmItemProperties!lstSources.ListIndex = 0
  1417.     frmItemProperties!lstSources.SetFocus
  1418.   Else
  1419.     MsgBox "The desired connection cannot be determined since there is more than one connection at this location."
  1420.   End If
  1421. End Sub
  1422. Sub ITGraph1_SelectRect (L As Integer, T As Integer, W As Integer, H As Integer, Button As Integer, Shift As Integer)
  1423.   If False Then
  1424.     ITGraph1.SelectRectLeft = L
  1425.     ITGraph1.SelectRectTop = T
  1426.     ITGraph1.SelectRectWidth = W
  1427.     ITGraph1.SelectRectHeight = H
  1428.     ITGraph1.PrintRectLeft = 0
  1429.     ITGraph1.PrintRectTop = 0
  1430.     ITGraph1.PrintRectWidth = Printer.Width / Printer.TwipsPerPixelX
  1431.     ITGraph1.PrintRectHeight = Printer.Height / Printer.TwipsPerPixelY
  1432.     Printer.Print
  1433.     ITGraph1.PrintToDC = Printer.hDC
  1434.     Printer.EndDoc
  1435.   Else
  1436.     ITGraph1.ZoomSelectRect = chkZoomOnSelectRect.Value
  1437.     If ITGraph1.DrawScale > hscDrawScale.Max Then
  1438.       ITGraph1.DrawScale = hscDrawScale.Max
  1439.     End If
  1440.     hscDrawScale.Value = ITGraph1.DrawScale
  1441.   End If
  1442. End Sub
  1443. Sub lstConnectionInfo_Click ()
  1444.   ITGraph1.QueryData = lstConnectionInfo.ItemData(lstConnectionInfo.ListIndex)
  1445.   ITGraph1.QueryState = ITG_QueryMatchConnectionId
  1446.   lstSelectNode.Visible = False
  1447.   pctSpecialMenu.Visible = False
  1448.   pctMain.Enabled = True
  1449.   If ITGraph1.QueryState Then
  1450.     frmPlayground.Enabled = False
  1451.     frmConnectionProperties!edtConnectFromIndex = Format$(ITGraph1.ConnectFromIndex)
  1452.     frmConnectionProperties!edtConnectToIndex = Format$(ITGraph1.ConnectToIndex)
  1453.     frmConnectionProperties!txtNewConnection.Caption = ""
  1454.     frmConnectionProperties.Show
  1455.   End If
  1456. End Sub
  1457. Sub lstConnectionInfo_LostFocus ()
  1458.   lstConnectionInfo.Visible = False
  1459. End Sub
  1460. Sub lstSelectNode_Click ()
  1461.   If ITGraph1.DrawScale = 0 Then
  1462.     ITGraph1.DrawScale = 100
  1463.   End If
  1464.   ITGraph1.SelectRectLeft = ITGraph1.ItemXpos(lstSelectNode.ItemData(lstSelectNode.ListIndex))
  1465.   ITGraph1.SelectRectTop = ITGraph1.ItemYpos(lstSelectNode.ItemData(lstSelectNode.ListIndex))
  1466.   ITGraph1.SelectRectWidth = ITGraph1.XSpan
  1467.   ITGraph1.SelectRectHeight = ITGraph1.YSpan
  1468.   ITGraph1.ZoomSelectRect = 0
  1469.   lstSelectNode.Visible = False
  1470.   pctSpecialMenu.Visible = False
  1471.   pctMain.Enabled = True
  1472. End Sub
  1473. Sub lstSelectNode_LostFocus ()
  1474.   lstSelectNode.Visible = False
  1475. End Sub
  1476. Sub optArrangeMode_Click (Index As Integer)
  1477.   ITGraph1.ArrangeMode = Index
  1478. End Sub
  1479. Sub optAutoArrange_Click ()
  1480.   ITGraph1.AutoArrange = ITG_AutoArrange
  1481. End Sub
  1482. Sub optManualArrange_Click ()
  1483.   ITGraph1.AutoArrange = ITG_ManualArrange
  1484. End Sub
  1485. Sub pctBackColor_Click ()
  1486.   Const CC_RGBINIT = &H1&
  1487.   On Error GoTo pctBackColor_Error
  1488.   CMDialog1.Color = ITGraph1.BackColor
  1489.   CMDialog1.Flags = CC_RGBINIT
  1490.   CMDialog1.Action = 3
  1491.   ITGraph1.BackColor = CMDialog1.Color
  1492.   pctBackColor.BackColor = CMDialog1.Color
  1493. pctBackColor_Error:
  1494.   Exit Sub
  1495. End Sub
  1496. Sub pctFillColor_Click ()
  1497.   Const CC_RGBINIT = &H1&
  1498.   On Error GoTo pctFillColor_Error
  1499.   CMDialog1.Color = ITGraph1.FillColor
  1500.   CMDialog1.Flags = CC_RGBINIT
  1501.   CMDialog1.Action = 3
  1502.   ITGraph1.FillColor = CMDialog1.Color
  1503.   pctFillColor.BackColor = CMDialog1.Color
  1504.   edtSampleText.BackColor = CMDialog1.Color
  1505. pctFillColor_Error:
  1506.   Exit Sub
  1507. End Sub
  1508. Sub pctForeColor_Click ()
  1509.   Const CC_RGBINIT = &H1&
  1510.   On Error GoTo pctForeColor_Error
  1511.   CMDialog1.Color = ITGraph1.ForeColor
  1512.   CMDialog1.Flags = CC_RGBINIT
  1513.   CMDialog1.Action = 3
  1514.   ITGraph1.ForeColor = CMDialog1.Color
  1515.   pctForeColor.BackColor = CMDialog1.Color
  1516.   edtSampleText.ForeColor = CMDialog1.Color
  1517. pctForeColor_Error:
  1518.   Exit Sub
  1519. End Sub
  1520. Sub pctZoomNode_DragDrop (Source As Control, X As Single, Y As Single)
  1521.   If Source = pctZoomNode Then
  1522.     ITGraph1.DrawScale = 0
  1523.   End If
  1524. End Sub
  1525. Sub pctZoomNode_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  1526.   pctZoomNode.Drag 1
  1527. End Sub
  1528. Sub pctZoomNode_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  1529.   pctZoomNode.Drag 2
  1530. End Sub
  1531. Sub txtTransferTarget_Click ()
  1532.   txtTransferTarget.Visible = False
  1533.   pctSpecialMenu.Visible = False
  1534.   pctSpecialMenu.Enabled = True
  1535.   pctMain.Enabled = True
  1536. End Sub
  1537. Sub txtTransferTarget_LostFocus ()
  1538.   txtTransferTarget.Visible = False
  1539. End Sub
  1540.